import request from "@/utils/request";
const BASE_URL = "/salvage/groundTool";

// 新建地面工具
export function createOne(data) {
  return request({
    url: BASE_URL + "/add",
    method: 'post',
    data: data
  })
}
/**
 * @deprecated 
 * @param {*} query 
 * @returns 
 */
export function queryOne(id) {
  return request({
    url: BASE_URL + "/" + id,
    method: "get",
  });
}
export function queryList(query) {
  return request({
    url: BASE_URL,
    method: 'get',
    params: query
  })
}
// 删除
export function deleteOne(id) {
  return request({
    url: BASE_URL + '/' + id,
    method: 'delete'
  })
}
// 修改
export function updateOne(data) {
  return request({
    url: BASE_URL + "/update",
    method: 'put',
    data: data
  })
}

export default {
  createOne,
  queryOne,
  queryList,
  deleteOne,
  updateOne,
}